package com.samshow.res.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Created by niwb on 2017/3/24.
 */
@Entity
@Table(name = "t_equip_program", schema = "mydb")
public class TEquipProgramEntity {
    private int nId;
    private String cEquipId;
    private Integer nPId;
    private String cName;

    @Id
    @Column(name = "N_ID")
    public int getnId() {
        return nId;
    }

    public void setnId(int nId) {
        this.nId = nId;
    }

    @Basic
    @Column(name = "C_EQUIP_ID")
    public String getcEquipId() {
        return cEquipId;
    }

    public void setcEquipId(String cEquipId) {
        this.cEquipId = cEquipId;
    }

    @Basic
    @Column(name = "N_P_ID")
    public Integer getnPId() {
        return nPId;
    }

    public void setnPId(Integer nPId) {
        this.nPId = nPId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TEquipProgramEntity that = (TEquipProgramEntity) o;

        if (nId != that.nId) return false;
        if (cEquipId != null ? !cEquipId.equals(that.cEquipId) : that.cEquipId != null) return false;
        if (nPId != null ? !nPId.equals(that.nPId) : that.nPId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = nId;
        result = 31 * result + (cEquipId != null ? cEquipId.hashCode() : 0);
        result = 31 * result + (nPId != null ? nPId.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "C_NAME")
    public String getcName() {
        return cName;
    }

    public void setcName(String cName) {
        this.cName = cName;
    }
}
